package com.jiangjiang.eshop.order.price.v1.calculator;

import com.jiangjiang.eshop.order.dto.OrderItemDTO;
import com.jiangjiang.eshop.order.dto.PromotionActivityResult;
import com.jiangjiang.eshop.promotion.dto.PromotionActivityDTO;

/**
 * @Author Jianghaowen
 * @Date 2021/7/14
 * @Description: 促销活动优惠计算器
 * @Version V1.0
 **/
public interface PromotionActivityCalculator {
    /**
     * 处理促销活动
     * @param item 订单条目
     * @param promotionActivity 促销活动
     * @return 促销活动计算结果
     * @throws Exception
     */
    PromotionActivityResult calculate(OrderItemDTO item, PromotionActivityDTO promotionActivity) throws Exception;
}
